Release 10.1A: OpenEdge Application Server:
Developing WebSpeed Applications
Message handling
A number of WebSpeed API functions facilitate message queuing and output. They interact with a message queue that allows you to organize messages into named groups. Table 3–2 lists these functions.
The definitions for these functions reside in
install-path/src/web/method/message.i.Generating messages directly
In embedded SpeedScript and SpeedScript-generating Web objects, where the program code explicitly controls the HTML output, you can call the message API function directly. For most applications you only need to use output-messages and queue-messages. These API functions call the other message API functions.
Generating messages with a custom tag
For HTML-mapping Web objects, WebSpeed provides a custom tag (
<!--WSMSG -->) intagmap.datto output messages at strategic points in a mapped HTML file. Generally, you invoke the queue-message function to append a message to the message queue. If you want a certain group of messages to be output to the Web, you can insert the<!--WSMSG -->tag for that group of messages at any point in the HTML file.This custom tag takes two optional attributes:
Using the custom tag with no attributes defaults to
TYPE="application messages"andNAME="all".The following HTML example contains two
<!--WSMSG -->tags, one for messages in aCustNumgroup and one for messages in aCustNamegroup. When the HTML-mapping Web object invokes the output-fields event procedure, the messages for each respective group are output in the Web page at the specified point, as shown in this code:
The tagmap utility procedure
install-path/src/web/support/webmsg.pcontains the defaultweb.output control handler to output the HTML for this custom tag.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |